<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
	<?php
		if(isset($_REQUEST["Fornavn"])) {
			$connection = mysqli_connect("localhost","root","","sofus-adressedatabase");
			$query = "select * from person,telefon where Fornavn='$_REQUEST[Fornavn]' and Efternavn='$_REQUEST[Efternavn]' and person.person_id =telefon.person_id";
			$result = mysqli_query($connection,$query);
			while($record = mysqli_fetch_array($result)) {
				echo "nummeret er: $record[Nummer]";
			}
		}
		
		
		
	?>
    
	<form action="personfinder.php">
    Fornavn: <input type="text" name="Fornavn" /><br>
    Efternavn: <input type="text" name="Efternavn" /><br>
    <input type="submit" />
    </form>
</body>
</html>